{extend name="admin@index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">添加售货机</div>
    <div class="layui-card-body">
        <form class="layui-form" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">机器名称</label>
                <div class="layui-input-inline">
                    <input type="text" style="width: 500px;" name="machinename" lay-verify="required" autocomplete="off" placeholder="机器名称" class="layui-input">
                </div>
             </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属用户</label>
                <div class="layui-input-inline">
                    <select name="userid" lay-verify="required">
                        {volist name="userlist" id="vo"}
                        <option value="{$vo['id']}" >{$vo['username']}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">地址</label>
                <div class="layui-input-inline">
                    <textarea name="address" style="width: 500px;height: 100px;" placeholder="地址" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">地图地址</label>
                <div class="layui-input-inline">
                    <input type="text" style="width: 500px;" name="mapaddress" lay-verify="required" autocomplete="off" placeholder="地图地址" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">机器状态</label>
                <div class="layui-input-inline">
                    <select name="operstate" lay-verify="required">
                        <option value="0" >下线</option>
                        <option value="1" >在线</option>
                        <option value="2" >维护中</option>
                        <option value="3" >损坏</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <div>
                    <button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
                    <button class="layui-btn layui-btn-normal" type="button" onclick="javascript:history.back(-1);">返回</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}